package com.quick.develop.flowable.mapper;

import org.apache.ibatis.annotations.Param;
import org.flowable.task.api.history.HistoricTaskInstance;
import org.flowable.task.service.impl.HistoricTaskInstanceQueryImpl;

import java.util.Collection;
import java.util.List;

/**
 * @author junyuan.liu
 * @description:
 * @date 2022/8/22 19:03
 */
public interface BpmHistoricTaskMapper {
    
    /** 
     * @description 查找类型为候选的任务
     * @param ids 任务ID
     * @return java.util.List<org.flowable.task.api.history.HistoricTaskInstance>
     * @author junyuan.liu
     * @date 2022/8/22 19:23
     */ 
    List<HistoricTaskInstance> selectCandidateHistoricTasksByIds(@Param("ids") Collection<String> ids);

    /** 
     * @description 查找会签点执行任务
     * @param ids 执行ID
     * @return java.util.List<org.flowable.task.api.history.HistoricTaskInstance>
     * @author junyuan.liu
     * @date 2022/8/23 18:48
     */ 
    List<HistoricTaskInstance> selectMultiHistoricTaskByExecutionIds(@Param("ids") Collection<String> ids);

    /**
     * @description 流程日志用
     * @param query HistoricTaskInstanceQueryImpl
     * @return java.util.List<org.flowable.task.api.history.HistoricTaskInstance>
     * @author junyuan.liu
     * @date 2023/8/15 10:31
     */
    List<HistoricTaskInstance> selectHistoricTaskByBusinessKey(HistoricTaskInstanceQueryImpl query);
}
